import request from '@/utils/request'

 // https://api.wuliuren.com/api/departments
export function getDepartmentsList() {
    return request({
        url: '/departments',
        method: 'get'
    })
}

 // https://api.wuliuren.com/api/departments
 export function addDepartment(data) {
  return request({
      url: '/departments',
      method: 'post',
      data: data
  })
}

 // https://api.wuliuren.com/api/departments
export function updateDepartment(data) {
  return request({
      url: '/departments/' + data.id,
      method: 'put',
      data: data
  })
}

 // https://api.wuliuren.com/api/departments
export function deleteDepartment(data) {
  return request({
      url: '/departments/' + data.id,
      method: 'delete'
  })
}
